import React,{useState} from 'react'
import {View,Text,TouchableOpacity,StyleSheet,ScrollView} from 'react-native';
import HTMLView from 'react-native-htmlview';
import '../../global'

const EDetail = ({route}) => {
    const title = route.params.title;
    const content = route.params.content;
    return (
        <View style={styles.background}>
            <Text style={styles.title}>{title}</Text>
            <ScrollView style={styles.content} contentContainerStyle={{display:'flex',justifyContent:'center',alignItems:'center'}}> 
                <HTMLView
                value={content}
                style={{width:'100%'}}
                stylesheet={styles0}
                />
            
      </ScrollView>
        </View>
    )
}

const styles0 = StyleSheet.create({
    span:{
        lineHeight:changeH(50),
        fontSize:changeW(30),
        marginBottom:changeH(10),
    }
})

const styles = StyleSheet.create({
    background:{
        width:'100%',
        backgroundColor:'rgb(255,255,255)'
    },
    title:{
        fontSize:changeW(45),
        marginTop:changeH(45),
        fontWeight:'bold',
        marginLeft:changeW(30)
    },
    content:{
        width:'95%',
        height:0.80*h,
        fontSize:changeW(25),
        lineHeight:changeW(35),
        marginLeft:changeW(30),
        marginTop:changeH(20),
        marginBottom:changeH(60),
    },
    
})

export default EDetail
